<template>
    <button @click="showdiv">显示</button>
       <button @click="showdivII">隐藏</button>
       <div v-if="showDialog">123s</div>
</template>
<script>
import { ref } from '@vue/reactivity'
export default {
  name: '',
  setup () {
    const showDialog = ref(true)
    function showdiv () {
      showDialog.value = true
    }
    function showdivII () {
      showDialog.value = false
    }
    return { showdiv, showdivII, showDialog }
  }
}
</script>
<style scoped lang="scss"></style>
